Lesson 5 - beginner exercise

For each scenario suggest what variables would be needed and what their data types would be. You do not need to write the code for them.

Scenario - Deduct stock when a product has been purchased. If the stock level is below a a threshold value then new stock is ordered.

Toggle answer

Scenario - Take a set of values (text or numbers) and print it as a list in HTML (eg ["hi", "bye"] would become <ul><li> hi </li><li> bye </li></ul>

Toggle answer

Scenario - Take a list of money values (in uk pounds) and convert them into american dollars. Add up the all of the converted values and output the result.

Toggle answer